package org.yu.team2023.flashdays;

import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.AABB;

import java.util.function.Consumer;

public class EntityUtils {
    public static void collectRangeEntitiesWithoutSelfAndExecute(Entity entity, double xSize, double ySize, double zSize, Consumer<Entity> execute){
        entity.level()
                .getEntities(entity, AABB.ofSize(entity.position(),xSize,ySize,zSize))
                .forEach(execute);
    }
}
